﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ViewUserResults.aspx.vb" Inherits="Training.ViewUserResults" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Training - Training:: Users Quiz Results</title>
<link rel="Stylesheet" type="text/css" media="screen" href="../css/adminStyle.css" />
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="ctr">
        <h2>Quiz Results for <%=uName%></h2>
        
        <div style="width:750px;text-align:left;margin:0 auto;" class="text">
            <asp:GridView ID="gvResults" runat="server" AllowSorting="True" 
                AutoGenerateColumns="False" DataSourceID="dsResults" 
                EmptyDataText="User has not completed any quizzes" Width="100%">
                <RowStyle CssClass="row1" />
                <EmptyDataRowStyle CssClass="row1" />
                <Columns>
                    <asp:BoundField DataField="QuizID" HeaderText="Quiz ID" SortExpression="QuizID">
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="QuizName" HeaderText="Quiz Name" HtmlEncode="False" 
                        ReadOnly="True" SortExpression="QuizName">
                    <HeaderStyle HorizontalAlign="Left" />
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="CompletedDate" HeaderText="Completed Date" 
                        SortExpression="CompletedDate">
                    <HeaderStyle HorizontalAlign="Left" />
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:CheckBoxField DataField="Passed" HeaderText="Passed" 
                        SortExpression="Passed">
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:CheckBoxField>
                </Columns>
                <HeaderStyle CssClass="rowHead" ForeColor="White" />
                <AlternatingRowStyle CssClass="row2" />
            </asp:GridView>
        </div>
        
        <br />
        
        <asp:Button ID="btnDelete" runat="server" Text="Delete Quiz Results" 
            CssClass="button" />
        
        <cc1:ConfirmButtonExtender ID="btnDelete_ConfirmButtonExtender" runat="server" 
            ConfirmText="Are you sure you want to delete the quiz data?" 
            Enabled="True" TargetControlID="btnDelete">
        </cc1:ConfirmButtonExtender>
        
        <br />
        <p><a href="Users.aspx">Manage Users</a> &nbsp; - &nbsp;
        <a href="Default.aspx">Admin Main</a></p>
    </div>
    
    <asp:SqlDataSource ID="dsResults" runat="server" 
        ConnectionString="<%$ ConnectionStrings:Conn %>" 
        SelectCommand="proc_GetUserQuizResults" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:QueryStringParameter Name="UserID" QueryStringField="uid" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    </form>
</body>
</html>
